#ifndef _GAUSS_JORDAN_HPP
#define _GAUSS_JORDAN_HPP

#include <iostream>
#include <cstring>
#include <cmath>
#include <cblas.h>
#include <rmatrix.hpp>
#include <intvector.hpp>
#include <fstream>
#include <iomanip>

using namespace std;
using namespace cxsc;

void gaussJordan(rmatrix& A, rmatrix& R);
inline void swapCols(double **a, const int col1, const int col2, const int nRows);
inline void scalarByCol(double **a, const int nRows, const int k, const double x);

double** RmatrixToDouble(const rmatrix& A);

double **newDoubleMatrix(int m, int n);
int **newIntMatrix(int m, int n);
void deleteMatrix(double **mat);
void deleteMatrix(int **mat);

#endif
